package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.Deptheads;
import com.wyzz.hr.pojo.Employee;

public abstract class BaseDeptheads implements Serializable {

	public BaseDeptheads() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseDeptheads(String id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseDeptheads(String id, Employee dheEmpNo, Department dheDeptNo,
			Integer dheIsHead, Date dheValidFrom, String clientNo) {
		hashCode = 0x80000000;
		setId(id);
		setDheEmpNo(dheEmpNo);
		setDheDeptNo(dheDeptNo);
		setDheIsHead(dheIsHead);
		setDheValidFrom(dheValidFrom);
		setClientNo(clientNo);
		initialize();
	}

	protected void initialize() {
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public Integer getDheIsHead() {
		return dheIsHead;
	}

	public void setDheIsHead(Integer dheIsHead) {
		this.dheIsHead = dheIsHead;
	}

	public Date getDheValidFrom() {
		return dheValidFrom;
	}

	public void setDheValidFrom(Date dheValidFrom) {
		this.dheValidFrom = dheValidFrom;
	}

	public Date getDheValidTo() {
		return dheValidTo;
	}

	public void setDheValidTo(Date dheValidTo) {
		this.dheValidTo = dheValidTo;
	}

	public String getClientNo() {
		return clientNo;
	}

	public void setClientNo(String clientNo) {
		this.clientNo = clientNo;
	}

	public Employee getDheEmpNo() {
		return dheEmpNo;
	}

	public void setDheEmpNo(Employee dheEmpNo) {
		this.dheEmpNo = dheEmpNo;
	}

	public Department getDheDeptNo() {
		return dheDeptNo;
	}

	public void setDheDeptNo(Department dheDeptNo) {
		this.dheDeptNo = dheDeptNo;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Deptheads))
			return false;
		Deptheads deptheads = (Deptheads) obj;
		if (null == getId() || null == deptheads.getId())
			return false;
		else
			return getId().equals(deptheads.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Deptheads";
	public static String PROP_DHE_VALID_FROM = "dheValidFrom";
	public static String PROP_DHE_DEPT_NO = "dheDeptNo";
	public static String PROP_CLIENT_NO = "clientNo";
	public static String PROP_DHE_IS_HEAD = "dheIsHead";
	public static String PROP_DHE_EMP_NO = "dheEmpNo";
	public static String PROP_DHE_VALID_TO = "dheValidTo";
	public static String PROP_ID = "id";
	private int hashCode;
	private String id;
	private Integer dheIsHead;
	private Date dheValidFrom;
	private Date dheValidTo;
	private String clientNo;
	private Employee dheEmpNo;
	private Department dheDeptNo;

}
